package tour.spring.bc.bo.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import tour.spring.bc.assembler.HotelAssembler;
import tour.spring.bc.dao.HotelDao;
import tour.spring.bc.dto.HotelDto;

@Service
public class HotelBoImpl {
	@Autowired
	private HotelDao hotelDao;

	@Autowired
	private HotelAssembler hotelAssembler;

	
	@Transactional
	public Collection<HotelDto> queryAll() {
		return hotelAssembler.convertToDto(hotelDao.loadAll());
	}
	
	
	
	
	public HotelDao getHotelDao() {
		return hotelDao;
	}

	public void setHotelDao(HotelDao hotelDao) {
		this.hotelDao = hotelDao;
	}

	public HotelAssembler getHotelAssembler() {
		return hotelAssembler;
	}

	public void setHotelAssembler(HotelAssembler hotelAssembler) {
		this.hotelAssembler = hotelAssembler;
	}
	
	
	
	
	
}
